﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Quartz;

namespace SD.CoreLibrary.CronExpressionDescripter
{
    public static class CronExtension
    {
        public static CronExpressionDescriptor Descrip(this CronExpression expression, CronDescriptionOptions options = null)
        {
            return Descrip(expression, CronDescriptionTypeEnum.None);
        }
        public static CronExpressionDescriptor Descrip(this CronExpression expression, CronDescriptionTypeEnum type, CronDescriptionOptions options = null)
        {
            if (options == null)
                options = new CronDescriptionOptions();
            CronExpressionDescriptor resp = new CronExpressionDescriptor(expression.CronExpressionString, type, options);
            return resp;
        }
    }
}
